#include <bits/stdc++.h>
using namespace std;

int main(){
	int x,y,z;
	cin >> x >> y;
	z = min(x,y);
	x = max(x,y);
	y = z;
	cout << x << "\n" << y;
	return 0;
}
